-
Notifications
You must be signed in to change notification settings - Fork 529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
acii art renderer #2353
base: master
Are you sure you want to change the base?
acii art renderer #2353
Conversation
```fish for f in docs/**.d2 set -l dir (dirname $f) set -l name (basename $f .d2) if [ $name = "in" ] set name out end if [ $name = "input" ] set name output end go run main.go $f $dir/$name.txt end ```
still quite big though 😅 let me know if you have some request |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah these are too large. I'm looking for diagrams that can be inlined into code. There should be no padding too.
I'm not quite sure how that can be achieved, because the layout engine gives a certain layout with those long lengths of edges. Shortening those edges would lead to overlaps of objects/text. The bounty placed on the issue is reward for solving that problem.
apparently treating it as image processing problem works! However,
|
@alixander does the size looks reasonable to you? (ignore the missing text/label, it's bug on my side 😂) |
The size looks reasonable!
|
It has the caveat that some diagram might get too wide, but sure. |
also reasonable to add further constraints as you see fit, e.g. only rectangles |
random inspiration https://diagon.arthursonzogni.com/#GraphDAG ![]() |
seems like the layout engine always came up with the optimal width
Hi, @DrSensor is this still being worked on? |
Sorry for the long break, currently it work fine and look decent on dagre layout despite it has some silly quirk (only NOTE: It will struggle on complex big diagram that has many vertex line but there is no way around this. the least user can do is try to use other layout. I kinda want to keep this approach instead of limit it to ELK layout. Should I continue or is this good enough? |
It's still far too big =(. When you zoom out enough it looks good, but definitely not something people can embed in code editors |
can i take a look at ascii.exp.d2? |
It was generated with TALA, but ELK will demonstrate it too (trying to just limit it to orthogonal lines). It's the kind of diagram that I think ascii art would be a fit for. Not trivial, not too complex, just boxes and arrows |
/claim #924
close #924
see
docs/**.txt
for the examples output